翻訳と辞書
Words near each other
・ Condenados
・ Condensate
・ Condensate (album)
・ Condensate polisher
・ Concurrent estate
・ Concurrent estimation
・ Concurrent Euclid
・ Concurrent Haskell
・ Concurrent jurisdiction
・ Concurrent lines
・ Concurrent List
・ Concurrent logic programming
・ Concurrent majority
・ Concurrent mark sweep collector
・ Concurrent MetateM
Concurrent ML
・ Concurrent object-oriented programming
・ Concurrent overlap
・ Concurrent Pascal
・ Concurrent powers
・ Concurrent resolution
・ Concurrent tandem catalysis
・ Concurrent Technologies Corporation
・ Concurrent testing
・ Concurrent use registration
・ Concurrent user
・ Concurrent validity
・ Concurrent Versions System
・ Concurring opinion
・ Concursion


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Concurrent ML : ウィキペディア英語版
Concurrent ML
Concurrent ML (CML) is a concurrent extension of the Standard ML programming language.
==Sample Code==
Here is sample code to print "hello, world" to the console. It spawns a thread which creates a channel for strings. This thread then spawns another thread which prints the first string that is received on the channel. The former thread then sends the "hello, world\n" string on the channel. It uses SML/NJ and CML
(note that the heap name will be different on non linux-x86 platforms; you may need to change the line with "cml_test.x86-linux" to
something different):
cml_test.cm:
Library
structure Hello
is
$cml/basis.cm
$cml/cml.cm
cml_test.sml
cml_test.sml:
structure Hello =
struct
open CML

fun hello () =
let val c : string chan = channel ()
in
spawn (fn () => TextIO.print (recv c));
send (c, "hello, world\n");
exit ()
end

fun main (name, argv) =
RunCML.doit (fn () => ignore (spawn hello), NONE)
end
Running:
$ ml-build cml_test.cm Hello.main
Standard ML of New Jersey v110.60 (Mon Nov 27 14:19:21 2006 )
(cml_test.cm )
($cml/basis.cm is stable )
($cml/cml.cm is stable )
((cml_test.cm):cml_test.sml )
(directory .cm/SKEL )
($cml/cml-internal.cm is stable )
($cml/core-cml.cm is stable )
($SMLNJ-BASIS/basis.cm is stable )
((cml_test.cm):cml_test.sml )
(directory .cm/GUID )
(directory .cm/x86-unix )
(2170, data: 42, env: 2561 bytes )
(18518-export.cm )
((18518-export.cm):cml_test.cm )
((18518-export.cm):18518-export.sml )
((18518-export.cm):18518-export.sml )
(309, data: 37, env: 42 bytes )
$ heap2exec cml_test.x86-linux cml_test
$ ./cml_test
hello, world

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Concurrent ML」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.